package pers.baiban.sqltoword.handler;

import pers.baiban.sqltoword.config.TableParam;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 样式处理器
 *
 * @author 强子初
 * @since 2023/11/29
 */
@Component
public class GenFilter {

    @Autowired
    private List<GenProcessor> genProcessors;

    public void doHandler(XWPFTable table, TableParam param) {
        for (GenProcessor genProcessor : genProcessors) {
            genProcessor.init(table, param);
            genProcessor.doHandler();
        }
    }
}